package edu.fatec.controller;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import edu.fatec.dao.IUsuarioDao;
import edu.fatec.dao.UsuarioDao;
import edu.fatec.model.Usuario;

/**
 * Servlet implementation class ControllerLogin
 */
@WebServlet("/ControllerLogin")
public class ControllerLogin extends HttpServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * @see HttpServlet#HttpServlet()
	 */
	public ControllerLogin() {
		super();
		// TODO Auto-generated constructor stub
	}


	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) 
	throws ServletException, IOException {

		Usuario u = new Usuario();

		u.setUsuario( request.getParameter("usuario"));
		u.setPassword(request.getParameter("senha"));
		Validadora<Usuario> validador = new Validadora<Usuario>(u);
		IUsuarioDao dao = new UsuarioDao();
		if(validador.validarObjeto()){
			
		}else{
			
		}



	}
}


